package com.github.wxiaoqi.security.gate.rpc;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.unipock.pay.vo.authority.PermissionInfo;
import com.unipock.pay.vo.user.UserInfo;

import java.util.List;

/**
 * ${DESCRIPTION}
 *
 * @author wanghaobin
 * @create 2017-06-21 8:11
 */
@FeignClient("pay-operater-auth")
@RequestMapping("user")
public interface IUserService {

	@RequestMapping(value = "/phone/{phone}", method = RequestMethod.GET)
	  public UserInfo getUserByPhone(@PathVariable("phone") String phone);
	
	@RequestMapping(value = "/username/{username}", method = RequestMethod.GET)
	public UserInfo getUserByUsername(@PathVariable("username") String username);

//	@RequestMapping(value = "/user/un/{username}/permissions", method = RequestMethod.GET)
//	public List<PermissionInfo> getPermissionByUsername(@PathVariable("username") String username);
//
//	@RequestMapping(value = "/permissions", method = RequestMethod.GET)
//	List<PermissionInfo> getAllPermissionInfo();
}
